def overweight_weights(weights):
    # 计算体重平均值
    avg_weight = sum(weights) / len(weights)

    # 找出比平均体重更重的体重
    overweight = [weight for weight in weights if weight > avg_weight]

    return overweight


def main():
    # 输入若干个体重
    weights = []
    while True:
        weight_input = input("请输入体重（输入q结束输入）：")
        if weight_input.lower() == 'q':
            break
        try:
            weight = float(weight_input)
            weights.append(weight)
        except ValueError:
            print("请输入有效的体重！")

    # 输出比平均体重更重的体重
    overweight = overweight_weights(weights)
    if overweight:
        print("超出平均体重的体重有：", overweight)
    else:
        print("没有体重超出平均体重。")


if __name__ == "__main__":
    main()
